<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../vue.js"></script>
</head>
<body>
    <div id = "box">
        <div>属性绑定</div>
        <div v-bind:class="color" >qewefsddfs</div>
        <div :class='username' >qewefsddfs</div>
        <div :class="isLogin?'a':'b'" >qewefsddfs</div>
    </div>
    <script>
      var obj = {
          data(){
              return {
                  username : "lhy",
                  isLogin : true,
                  color: 'red'
              }
          }
      }
      var app = Vue.createApp(obj).mount("#box")
    </script>
</body>
</html>